package com.xiaofei.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.xiaofei.pojo.DjshCat;


public interface DjshCatMapper {
	
    int insert(DjshCat record);

    int updateByPrimaryKey(DjshCat record);

    //根据ID查询
	DjshCat getDjshCatByCatId(Long catId);
	//根据NAME查询
	DjshCat getDjshCatByCatName(String catName);
	//根据父分类ID查询
	List<DjshCat> getChildDjshCatListByPid(Long catId);
	//根类分类ID 和 分类等级查询
	List<DjshCat> getChildDjshCatListByCatGrade(int catGrades);
	//修改分类
	int editDjshCat(DjshCat djshCat);
	//DjshCat 属性 有值 添加到数据库。
	int saveDjshCat(DjshCat djshCat);
	//删除操作
	int deleteDjshCat(Long catId);
	//查询所有分类
	List<DjshCat> getAllDjshCatList();
	//后台：根据商品更新底层分类商品数量与总价
	void updateCatGoodsCountAndPriceByGoods();
	//后台：更新某级分类商品数量与总价
	void updateCatGoodsCountAndPrice(int grade);
	//后台：分别统计分类下点睛与专柜商品数量与总价
	void updateCatDjGoodsCountAndPriceByGoods();
	void updateCatDjGoodsCountAndPrice(int grade);
	void updateCatStoreGoodsCountAndPriceByGoods();
	void updateCatStoreGoodsCountAndPrice(int grade);
	//后台：查找是否加入banner的分类
	List<DjshCat>getDjshCatListByTypeAndBid(Map map);
	int getDjshCatCountByTypeAndBid(Map map); 
	//pc商城调用
	List<DjshCat> getDjshCatListByIsIndustry(@Param("IsIndustry")Integer IsIndustry, @Param("industryCatGrade")Integer industryCatGrade,@Param("pageSize")Integer pageSize);
}